package org.smart4j.chapter;


import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.smart4j.framework.annotation.Action;
import org.smart4j.framework.annotation.Controller;
import org.smart4j.framework.bean.View;

@Controller
public class HelloController {
	
	@Action("get:/index")
	public View index(){
		DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		String currentTime = dateFormat.format(new Date());
		return new View("hello.jsp").addModel("currentTime", currentTime);
	}

}
